package com.xxl.job.dao.sqlmapper;

import java.util.HashMap;

/**
 * Created by liup on 2018/8/29.
 * @author liup
 */
public class ProcSqlRepository {

    /**
     * 执行存储过程
     * @param map
     */
    public  String execProc(HashMap map)
    {
        StringBuilder sb=new StringBuilder();
        if (map.get("params")==null)
        {
            sb.append(" call "+map.get("proc")+"()");
        }
        else
        {
            sb.append(" call "+map.get("proc")+"('"+map.get("params")+"')");
        }

        return sb.toString();
    }
}
